// pages/my/my.js
Page({

    /**
     * 页面的初始数据
     */
    data: {


    },
    onLoad: function() {
        this.loadUser();
    },
    loadUser: function() {
        var page = this;
        var userId = wx.getStorageSync("userId");
        var nickName = wx.getStorageSync("nickName");
        if (userId = "" || userId == null) {
            wx.navigateTo({
                url: '../login/login'
            })
        } else {
            page.setData({ nickName: nickName })
        }
    },
    nav: function(e) {
        console.log(e)
        var id = e.currentTarget.id;
        var status = e.currentTarget.dataset.status;
        console.log(status)
        wx.navigateTo({
            url: '../myOrder/myOrder?id=' + id + '&status=' + status
        })
    },
    clearStore: function() {
        var page = this;
        wx.clearStorage({
            success: (res) => {
                page.showTip("清除缓存成功！");
            },
        })
    },
    showTip: function(content) {
        wx.showModal({
            title: '提示',
            content: content,
            showCancel: false
        })

    }




})